<#include "../common/layout.ftl"/>
<@layout>
<div class="well">
	<span class="label label-success">开票</span>
	<form id="form1" class="well form-horizontal" action="/invoice/addInvoice"  method="post">
	  <input name="order_id"  type="hidden" value="${order_id}" >
      <div class="control-group">
        <label class="control-label" for="focusedInput">公司抬头：</label>
        <div class="controls" >
          <#if record??>
          	<input class="input-xlarge focused" name="company_name" id="company_name" type="text" style="height: 26" value="${record.company_name!""}" >
          <#else>
            <input class="input-xlarge focused" name="company_name" id="company_name" type="text" style="height: 26" value="" >
          </#if>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="focusedInput">收件人地址：</label>
        <div class="controls" >
          <#if record??>
          	<input class="input-xlarge focused" name="address" id="address" type="text"  style="height: 26" value="${record.address!""}">
          <#else>
	        <input class="input-xlarge focused" name="address" id="address" type="text"  style="height: 26" >
          </#if>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="focusedInput">联系人：</label>
        <div class="controls" >
          <#if record??>
          	<input class="input-xlarge focused" name="person_name" id="person_name" type="text"  style="height: 26" value="${record.person_name!""}">
          <#else>
	        <input class="input-xlarge focused" name="person_name" id="person_name" type="text"  style="height: 26" >
          </#if>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="focusedInput">电话：</label>
        <div class="controls" >
          <#if record??>
          	<input class="input-xlarge focused" name="phone" id="phone" type="text"  style="height: 26" value="${record.phone!""}">
          <#else>
	        <input class="input-xlarge focused" name="phone" id="phone" type="text"  style="height: 26" >
          </#if>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="focusedInput">金额：</label>
        <div class="controls" >
          <#if record??>
          	<input class="input-xlarge focused" name="money" id="money" type="text"  style="height: 26" value="${record.money!""}">
          <#else>
	        <input class="input-xlarge focused" name="money" id="money" type="text"  style="height: 26">
          </#if>
        </div>
      </div>
      <div class="form-actions">
        <button type="submit" class="btn btn-primary">确 定</button>
        <button type="reset" class="btn">重 置</button>
        <button type="button" class="btn btn-info" onclick="javascript:history.back();">返回</button>
      </div>
  </form>
  </div>

<script>
	$(function() { 
     $("#form1").validity(function() {
         $("#company_name").require();
         $("#content").require();
         $("#money").require();
     });
     
 }); 
</script>
</@layout>